import java.util.Arrays;

public class Solution1744 {
    public boolean[] canEat(int[] candiesCount, int[][] queries) {
        long[] sum=new long[candiesCount.length+1];
        sum[0]=0;
        for (int i=0;i<candiesCount.length;i++){
            sum[i+1]=sum[i]+candiesCount[i];
        }
        boolean[] ans=new boolean[queries.length];
        for (int i=0;i<queries.length;i++){
            if (((long)queries[i][1]+1)>sum[queries[i][0]+1] || (long)queries[i][2]*((long)queries[i][1]+1)<=sum[queries[i][0]]){
                ans[i]=false;
            }else{
                ans[i]=true;
            }
        }
        return ans;
    }

    public static void main(String[] args) {
        System.out.println(Arrays.toString(new Solution1744().canEat(new int[]{7,4,5,3,8},new int[][]{{0,2,2},{4,2,4},{2,13,1000000000}})));
    }
}
